import org.opencv.core.Core;
import org.opencv.core.Mat;
import org.opencv.highgui.HighGui;
import org.opencv.imgcodecs.Imgcodecs;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86185
 * Date: 2023-04-06
 * Time: 22:25
 */
public class AddWeighted {
    static {
        System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
    }

    public static void main(String[] args) {
        Mat src1 = Imgcodecs.imread("src1.JPG");
        Mat src2 = Imgcodecs.imread("src1.JPG");
        Mat dst = new Mat();
        //Core.addWeighted(src1,0.5, src2, 0.5, 0, dst);
        //Core.add(src1,src2,dst);
        Mat mat = Imgcodecs.imread("src1.JPG");
        Core.bitwise_not(mat,dst);//反相，底片效果
        //Imgcodecs.imwrite("mixed.JPG",dst);
        HighGui.imshow("mixed",dst);
        HighGui.waitKey(0);
    }
}
